/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ps.server.classes;

/**
 *
 * @author Ricardo
 */
public class taxes {

    private String id;
    private double rate;
    private String account_number;
    private String active;
    private String deleted;
    private String[][] name;

    private int column=6;

    public int getColumn() {
        return column;
    }

    public String getAccount_number() {
        return account_number;
    }

    public void setAccount_number(String account_number) {
        this.account_number = account_number;
    }
    
    public String getActive() {
        return active;
    }

    public void setActive(String active) {
        this.active = active;
    }

    public String getDeleted() {
        return deleted;
    }

    public void setDeleted(String deleted) {
        this.deleted = deleted;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String[][] getName() {
        return name;
    }

    public void setName(String[][] name) {
        this.name = name;
    }

    public double getRate() {
        return rate;
    }

    public void setRate(double rate) {
        this.rate = rate;
    }

    public String toXML() {
        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
        xml += "<prestashop xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n";
        xml += "<tax>\n";
        xml += "<id></id>\n";
        xml += "<rate></rate>\n";
        xml += "<account_number></account_number>\n";
        xml += "<active></active>\n";
        xml += "<deleted></deleted>\n";
        xml += "<name>\n";
        for (int x = 0; name.length > x; x++) {
            xml += "<language id=\"" + name[x][0] + " \">" + name[x][1] + "</language>\n";
        }
        xml += "</name>\n";
        xml += "</tax>\n";
        xml += "</prestashop>";

        return xml;
    }
    
     public String[] GetMetaData() {
        return new String[]{
                    "id",
                    "rate",
                    "account_number",
                    "active",
                    "deleted",
                    "name"
        };
     }
}
